<% var bundlePrefix=isDev ? 'http://localhost:8001' : '/dist' %>

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta
      name="viewport"
      content="minimum-scale=1, initial-scale=1, width=device-width"
    />
    <title><%- title %></title>
    <link rel="icon" href="/public/images/favicon.ico" type="image/x-icon" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="keywords" content="Web" />
    <meta name="description" content="description" />
    <% if (!isDev) { %> <% if (manifest && manifest.css && manifest.css.length>
    0) { %> <% manifest.css.forEach(function(item){ %>
    <link href="<%= bundlePrefix %>/<%= item %>" rel="stylesheet" media="all" />
    <% }) %> <% } %> <% } %>
  </head>

  <body>
    <div id="root"></div>

    <script>
      sessionStorage.setItem("config", JSON.stringify(<%- config %>));
      window.globalConfig = JSON.parse(
        sessionStorage.getItem("config") || "{}"
      );
      var userinfo = JSON.parse(JSON.stringify(<%- userinfo %>)) || {};
    </script>
    <% if (manifest && manifest.js && manifest.js.length> 0) { %> <%
    manifest.js.forEach(function(item){ %>
    <script
      type="text/javascript"
      src="<%= bundlePrefix %>/<%= item %>"
    ></script>
    <% }) %> <% } %>
  </body>
</html>
